[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]

[tool.poetry]
authors = ["Vano <vano.krainev@yandex.ru>"]
description = "The microservice which get images, their meta and remaining data. Process and aggregate them, then write them down to database structurally"
name = "anonymizer"
readme = "README.md"
version = "0.1.0"

[tool.poetry.dependencies]
SQLAlchemy = "^2.0.29"
aiobotocore = "^2.12.3"
aiofiles = "^23.2.1"
asyncpg = "^0.29.0"
boto3 = "^1.21.42"
confluent-kafka = {extras = ["avro"], version = "^2.3.0"}
punq = "^0.7.0"
pydantic = "^2.6.4"
pydantic-settings = "^2.2.1"
python = "^3.10"
tenacity = "^8.2.3"

[tool.poetry.group.dev.dependencies]
black = "^24.3.0"
boto3-type-annotations-with-docs = "^0.3.1"
coverage = {extras = ["toml"], version = "^7.5.1"}
flake8 = "^7.0.0"
isort = "^5.13.2"
mypy = "^1.10.0"
pandas = "^2.2.2"
pip-audit = "^2.7.3"
pylint = "^3.1.0"
pytest = "^8.1.1"
pytest-testdox = "^3.1.0"
toml-sort = "^0.23.1"
typing-extensions = "^4.11.0"

[tool.coverage.run]
branch = true
source = ['src']

[tool.coverage.report]
fail_under = 90
precision = 2
skip_covered = true

[tool.coverage.xml]
output = "coverage.xml"

[tool.black]
line-length = 99
target-version = ['py310']

[tool.tomlsort]
in_place = true
no_sort_tables = true
sort_table_keys = true

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
plugins = ["pydantic.mypy"]
pretty = true
python_version = "3.10"
show_column_numbers = true
show_error_codes = true
strict_optional = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
  "json_logger.*",
  "punq.*",
  "surf.*",
  "uvicorn.*"
]

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
